<?php
/**
 * Elgg top toolbar
 * The standard elgg top toolbar
 */



// Elgg logo
//echo elgg_view_menu('topbar', array('sort_by' => 'priority', array('elgg-menu-hz')));
//$logo_path = $vars['url'] . 'mod/rsactivity/graphics/logo_mobile.png';
//echo "<a href=\"{$vars['url']}\">";
//echo "<div class=\"logo_centre\"><img src=\"{$logo_path}\" align=\"center\"/></div>";
//echo "</a>";

// elgg tools menu
// need to echo this empty view for backward compatibility.
//echo elgg_view("navigation/topbar_tools");
?>
<div id="elgg_topbar">
	<div id="elgg_topbar_container_left">
		<div  class="toolbartext">
		<a href="<?php echo $vars['url']; ?>rsactivity"><?php echo "Welcome to " . elgg_get_config('sitename');?></a>
		</div>
	</div>
	
    <div id="elgg_topbar_container_right">
    	    <div class="toolbarlinks2">
        <?php
            if (elgg_is_logged_in()) {
        ?>
        <a href="<?php echo $vars['url']; ?>action/logout"><small><?php echo elgg_echo('logout'); ?></small></a>
        <?php
        }    else {
        ?>
        <a href="<?php echo $vars['url']; ?>rsactivity/login"><small><?php echo elgg_echo('login'); ?></small></a>
        <?php
            }
        ?>        
    </div>

        <?php
            if (elgg_is_logged_in()) {
        ?>           
        <div class="toolbarlinks2">        
            <?php
            //allow people to extend this top menu
            echo elgg_view('elgg_topbar/extend', $vars);
            ?>

            <a href="<?php echo $vars['url']; ?>rsactivity/settings" class="usersettings"><?php echo elgg_echo('settings'); ?></a>
        
            <?php
                // The administration link is for admin or site admin users only
                if (elgg_is_admin_logged_in()) { 
            ?>
        
            <a href="<?php echo $vars['url']; ?>pg/admin/" class="usersettings"><?php echo elgg_echo("admin"); ?></a>
            <?php
                }
            ?>
        </div>
        <?php
            }
        ?>
            <?php
                if (elgg_is_logged_in()) {
            ?>
        <div class="toolbarlinks2">
            <!--a href="<?php echo $vars['url']; ?>rsactivity/profile"><img class="user_mini_avatar" src="<?php echo $_SESSION['user']->getIcon('topbar'); ?>"></a-->
            <a href="<?php echo $vars['url']; ?>rsactivity/profile"><?php echo elgg_echo("Profile"); ?></a>
        </div>
            <?php
                }
            ?>
        <div class="toolbarlinks2">
            <!--a href="<?php echo $vars['url']; ?>rsactivity"><img class="user_mini_avatar" src="<?php echo $vars['url']; ?>mod/rsactivity/graphics/home-icone.png"></a-->
            <a href="<?php echo $vars['url']; ?>rsactivity"><?php echo elgg_echo("Home"); ?></a>
        </div>



    </div>

    <!--div id="elgg_topbar_container_search">
        <form id="searchform" action="<?php echo $vars['url']; ?>search/" method="get">
            <input type="text" size="21" name="tag" value="Search" onclick="if (this.value=='Search') { this.value='' }" class="search_input" />
            <input type="submit" value="Go" class="search_submit_button" />
        </form>
    </div -->

</div><!-- /#elgg_topbar -->

<!--div style="clear:both;"></div-->
